VERSION 5.00 Begin VB.Form frmTest1 Caption = "Click and double-click me!" ClientHeight = 3195 ClientLeft = 60 ClientTop = 345 ClientWidth = 4680 LinkTopic = "Form1" ScaleHeight = 213 ScaleMode = 3 'Pixel ScaleWidth = 312 StartUpPosition = 3 'Windows Default Attribute VB_Name = "frmTest1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False ' The font object Dim myFont As New CDXVBFont Private Sub Form_Click() ' Clear the screen Me.Cls myFont.CreateNewFont "fixedsys" myFont.SetFont Me Randomize ' Draw the text myFont.GradTextOut Me, 0, 0, RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), "CDXVBFont" myFont.GradTextOut Me, 30, 14, RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), "CDXVBFont" myFont.GradTextOut Me, 60, 28, RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), "CDXVBFont" myFont.GradTextOut Me, 30, 42, RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), "CDXVBFont" myFont.GradTextOut Me, 0, 56, RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), "CDXVBFont" End Sub Private Sub Form_DblClick() Me.Cls For i = 0 To Screen.FontCount Randomize myFont.CreateNewFont Screen.Fonts(i) myFont.SetFont Me myFont.GradTextOut Me, Int(Rnd * (Me.ScaleWidth - myFont.GetTextWidth(Me, Screen.Fonts(i)))), Int(Rnd * (Me.ScaleHeight - myFont.GetTextHeight(Me, Screen.Fonts(i)))), RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255)), Screen.Fonts(i) Next i End Sub Private Sub Form_Load() ' Create font myFont.CreateNewFont "fixedsys" ' Set font to fixedsys myFont.SetFont Me End Sub